const FileService = require('../services/file.service')

const fileService = new FileService()

class FileController {
  async addOne (ctx, next) {
    const files = ctx.request.files
    console.log(files)
    const data = await fileService.addOne(files)
    ctx.response.body = data
  }
  async deleteOne (ctx, next) {
    const id = ctx.request.params.id
    const data = await fileService.deleteOne(id)
    ctx.response.body = data
  }
}

module.exports = FileController